<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>组件基础</title>
    <link rel="stylesheet" href="css/font-awesome-4.7.0/css/font-awesome.css">
</head>

<body>
    <div id="app">

        <!-- <input type="text" :value="nickname" @input="nickname = $event.target.value"> -->
        {{nickname}}
        <sb-input v-model="nickname" @search="mysearch" placeholder="请输入关键词" style="width:400px;"></sb-input>

        {{score}}
        <sb-raty :count="count" v-model="score"></sb-raty>
    </div>
    <script src="https://cdn.bootcss.com/vue/2.6.4/vue.js"></script>
    <script src="components/sb-input.js"></script>
    <script src="components/sb-raty.js"></script>
    <script>
        Vue.config.productionTip = false
        Vue.config.devtools = false
        var vm = new Vue({
            el: "#app",
            data: {
                count: 10,
                score: 6,
                nickname: "Simba"
            },
            methods: {
                mysearch(val) {
                    alert('搜索值是' + this.score)
                }
            }
        })
    </script>
</body>

</html>